package cn.com.cfae.iras.doc.analyze.components.integrity;

import cn.com.cfae.iras.doc.analyze.components.BaseComponent;
import cn.com.cfae.iras.doc.analyze.components.beans.ComponentResult;
import cn.com.cfae.iras.doc.analyze.parse.kv.KVText;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.UUID;

/**
 * Created by 佟媛媛 on 18/10/23.
 */

@Component("I1009")
@Scope("prototype")
public class I1009 extends BaseComponent {

    private static Logger log = LoggerFactory.getLogger(I1009.class);


    /**
     * @auth 佟媛媛
     * @date 18/10/29 下午7:13
     * @desc TODO 暂不做
     * 检查募集说明书中是否披露了各主要板块能说明其行业地位和经营优势的行业关键指标。并检查是否标注了数据来源。各主要指标最低标准参照IAAD。
     * 若未披露相应关键指标，提示具体未披露哪个板块哪个指标。例如“未披露煤炭板块中资源储量数据”
     * "1、一期检查7大行业（高速公路、火电、煤炭、钢铁、水泥、城建、房地产）；
    2、在主营业务文字描述部分识别主营行业，和IAAD匹配，同时检查指标是否存在（除财务指标之外的行业经营指标）；
    3、需业务确认每个行业经营优势的指标；
    4、未匹配已有的IAAD行业，提示进行人工检查；"

    是否引用
     */
    @Override
    public List<ComponentResult> handlerM() {
        List<ComponentResult> list = new ArrayList<>();
        setCatalogId("M-5");
        return list;
    }

    @Override
    public List<ComponentResult> handlerBM() {
        return null;
    }

    @Override
    public List<ComponentResult> handlerDM() {
        return null;
    }

    @Override
    public List<ComponentResult> handlerBDM() {
        return null;
    }


    private ComponentResult getComponentResult(boolean annotationFlag,String exist,String keyword,int pageNum,String promptMsg,String ruleName,List<ComponentResult.TextPosition> textPositionList){
        ComponentResult result = new ComponentResult();
        result.setAnnotationFlag(annotationFlag);
        result.setCatalogId(getCatalogId());
        result.setChapterId(getChapterId());
        result.setExist(exist);
        result.setKeyword(keyword);
        result.setPageNum(pageNum);
        result.setPromptMessage(promptMsg);
        result.setRegulationId(getRegulationId());
        result.setRuleName(ruleName);
        result.setTextPosition(textPositionList);
        result.setUid(UUID.randomUUID().toString());
        return result;
    }


}
